﻿using Prism.Services.Dialogs;
using SmartPlant.Core;
using SmartPlant.Model;
using System;
using System.Collections.Generic;
using System.Text;

namespace SmartPlant.Core
{
    /// <summary>
    /// 自己封装的对话框参数类
    /// </summary>
    public class SmartDialogParameter:DialogParameters
    {
        public SmartDialogParameter(string query)
            : base(query)
        {
        }
        public SmartDialogParameter(string title, DialogPurpose dialogPurpose = DialogPurpose.None)
        {
            this.Add(DialogParameterKeys.Title, title);
            this.Add(DialogParameterKeys.Purpose, dialogPurpose);
        }
        public SmartDialogParameter(decimal Id)
        {
            this.Add(DialogParameterKeys.Id, Id);
        }
    }

    public class SmartDialogParameter<T> : DialogParameters
    {
        public SmartDialogParameter(string query)
            : base(query)
        {
        }
        public SmartDialogParameter(string title, DialogPurpose dialogPurpose,T item)
        {
            this.Add(DialogParameterKeys.Title, title);
            this.Add(DialogParameterKeys.Purpose, dialogPurpose);
            this.Add(DialogParameterKeys.Content, item);
        }
    }
}
